{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_list %}

{% block extrastyle %}
  {{ block.super }}
  <link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" />
  <script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
  <script type="text/javascript" src="/static/admin/js/vendor/jquery/jquery.js"></script>
  <script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
    <script type="text/javascript" src="/static/admin/js/core.js"></script>
    <script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
    <script type="text/javascript" src="/static/admin/js/actions.js"></script>
    <script type="text/javascript" src="/static/admin/js/urlify.js"></script>
    <script type="text/javascript" src="/static/admin/js/prepopulate.js"></script>
    <script type="text/javascript" src="/static/admin/js/vendor/xregexp/xregexp.js"></script>
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/static/admin/css/responsive.css">
    <meta name="robots" content="NONE,NOARCHIVE">

  {{ media.css }}
  {% if not actions_on_top and not actions_on_bottom %}
    <style>
      #changelist table thead th:first-child {width: inherit}
    </style>
  {% endif %}
{% endblock %}

{% block extrahead %}
{{ block.super }}
{{ media.js }}
{% endblock %}

{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}

{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:manualpick_tmobilepick_changelist' %}">提取号码</a>
&rsaquo; 导入数据
</div>
{% endblock %}
{% endif %}


{% block content %}
  <div id="content-main">
    {% if cl.formset.errors %}
        <p class="errornote">
        {% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
        </p>
        {{ cl.formset.non_form_errors }}
    {% endif %}

    <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
      <form id="changelist-form" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
      {% block result_list %}
        {% if results %}
            <div class="actions">
                <label>动作 <select name="action" required="">
              <option value="" selected="">---------</option>

                    {% for action in actions %}
                        <option value="{{ action.username }}_{{ action.nickname }}">挑选所选的 {{ action.nickname }}</option>
                    {% endfor %}
{#              <option value="pick_selected">挑选所选的 多选数据</option>#}
            </select></label>

                <input name="select_across" value="0" class="select-across" type="hidden">
                <button type="submit" class="button" title="运行选中的动作" name="index" value="0">执行</button>

                    <span class="action-counter" data-actions-icnt="1" style="display: inline;">1 个中 0 个被选</span>
            </div>


            <div class="results">
            <table id="result_list">
            <thead>
            <tr>

            <th scope="col" class="action-checkbox-column">

               <div class="text"><span><input id="action-toggle" type="checkbox"></span></div>
               <div class="clear"></div>
            </th>
            <th scope="col" class="column-mobile">
               <div class="text">手机号</div>
               <div class="clear"></div>
            </th>
            <th scope="col" class="column-note">
               <div class="text">注释</div>
               <div class="clear"></div>
            </th>
            <th scope="col" class="column-status">
               <div class="text">创建用户</div>
               <div class="clear"></div>
            </th>
            <th scope="col" class="column-status">
               <div class="text">创建时间</div>
               <div class="clear"></div>
            </th>
            </tr>
            </thead>
            <tbody>

            {% for result in results %}
            <tr class="row1">
                <td class="action-checkbox">
                    <input name="_selected_action" value="{{ result.pk }}" class="action-select" type="checkbox"></td>
                <th class="field-mobile">
                    {{ result.mobile }}
                    </th>
                <td class="field-name">{{ result.name }}--{{ result.sex }}</td>
                <td class="field-create_user">{{ result.create_user }}
                <td class="field-ctime">{{ result.ctime }}
                </td>
            </tr>
            {% endfor %}

            </tbody>
            </table>
            </div>
        {% endif %}
      {% endblock %}
      </form>
    </div>
  </div>
{% endblock %}
